package com.bawei.network


import com.zyj.retrofit.adapter.FlowCallAdapterFactory
import retrofit2.Retrofit
import retrofit2.converter.gson.GsonConverterFactory

/**
 * @author ZhangRuiPeng
 * @description:
 */
class NoneRetrofit : RetrofitCreateImpl() {
    override fun readTime(): Long {
        return 60
    }

    override fun writeTime(): Long {
        return 60
    }

    override fun connectTime(): Long {
        return 60
    }

    override fun getRetrofit(): Retrofit {
        var okBuilder = createOkBuilder()
        val build = Retrofit.Builder()
        build.baseUrl(BuildConfig.BASE_URL)
            .client(okBuilder.build())
            .addConverterFactory(GsonConverterFactory.create())
            .addCallAdapterFactory(FlowCallAdapterFactory.createAsync())
        return build.build()
    }
}